<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>一隅立画</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="./css/jingsaidetail.css" />
		<link rel="stylesheet" type="text/css" href="./layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="./css/element.css"/>
		<link rel="stylesheet" type="text/css" href="./css/basestyle.css" />
		<link rel="stylesheet" type="text/css" href="./viewer/dist/viewer.min.css"/>
		<script src="js/head.js" type="text/javascript"></script>
		<script src="js/xshead.js" type="text/javascript"></script>
		<script src="js/base.js"></script>
	</head>
	<body style="background-color: #f2f3f5;">
		<!-- 中间部分 -->
		<div class="content">
			<div class="container">
				<div class="row">
					<div ref="allpopup" style="display: none;" id="rightside" class="col-lg-8 col-md-8">
						<!-- 竞赛详情 -->
						<div class="racedetail">
							<div class="racedetailinfo">
								<div class="racedetailtitle">
									<p>{{pagelist.title}}</p>
									<div class="kiukuanseeing">
										<div class="tuikuan" v-show="refund == 1" @click="openrefundpopup">
											<p v-show="languagestatus == 1">退款</p>
											<p v-show="languagestatus == 2">refund</p>
										</div>
										<div class="bianji" v-show="edit == 1" @click="openEditpopup">
											<p v-show="languagestatus == 1">编辑</p>
											<p v-show="languagestatus == 2">Edit</p>
										</div>
									</div>
								</div>
								<div class="racedetailpeo">
									<div class="racedetailpeoimg">
										<div class="racedetailpeoimgle">
											<div class="racedetailpeoimgleimg">
												<img :src="pagelist.avatar">
											</div>
											<div class="racedetailpeoimglename">
												<p>{{pagelist.nickname}}</p>
											</div>
										</div>
										<div class="racedetailpeoimgri" @click="changcoll(pagelist.id,pagelist.collstatus)">
											<img v-show="pagelist.collstatus == 0" src="./images/weishoucnag.png">
											<img v-show="pagelist.collstatus == 1" src="./images/yishoucang.png">
										</div>
									</div>
									<div class="racedetailpeodata">
										<div class="racedetailpeodatatime">
											<div class="racedetailpeodatatimeimg">
												<img src="./images/data.png">
											</div>
											<div class="racedetailpeodatatimewarp">
												<p>{{pagelist.createtime}}</p>
											</div>
										</div>
										<div class="racedetailpeodatanum">
											<div class="racedetailpeodatanumimg">
												<img src="./images/browse_num.png">
											</div>
											<div class="racedetailpeodatanumtxt">
												<p>{{pagelist.views}}</p>
											</div>
										</div>
									</div>
								</div>
								<div v-show="edittext != ''" class="edittext">{{edittext}}</div>
								<div class="racedetailline"></div>
							</div>
							<div class="racedetailwarp">
								<!-- 富文本 -->
								<div v-show="languagestatus == 1" v-html="pagelist.describecontent"> </div>
								<div v-show="languagestatus == 2" v-html="pagelist.describeEcontent"> </div>
								<!-- 竞赛 -->
								<div class="racedetailwarpdown">

									<div class="racedetailwarpdownracetime">
										<div class="racedetailwarpdownracetimetitle">
											<p v-show="languagestatus==1">竞赛时间<span>（注：获奖评选于72小时内完成）</span></p>
											<p v-show="languagestatus==2">Competition time <span>(Note: The award will be completed within 72 hours)</span></p>
										</div>
										<div class="racedetailwarpdownracetimedata">
											<p v-show="languagestatus == 1">截止至：</p>
											<p v-show="languagestatus == 2">As of：</p>
											<p>{{pagelist.endtime}}</p>
										</div>
									</div>
									<div class="racedetailwarpdownracemoney">
										<div class="racedetailwarpdownracemoneytitle">
											<p v-show="languagestatus == 1">竞赛奖金</p>
											<p v-show="languagestatus == 2">Competition bonus</p>
										</div>
										<div class="racedetailwarpdownracemoneywarp">
											<div class="racedetailwarpdownracemoneywarpnav">
												<div class="totalbonus">
													<p v-show="languagestatus == 1">奖金总额：</p>
													<p v-show="languagestatus == 2">Total bonus：</p>
													<p>￥</p>
													<p>{{pagelist.money}}</p>
												</div>
												<div class="totalbonuschlidone totalbonuschilditem" v-for="(reward,index) in rewardlist" :key="index"
												 v-show="languagestatus == 1">
													<p v-show="languagestatus == 1">{{reward.name}}</p>
													<p v-show="languagestatus == 2">{{reward.nameE}}</p>
													<div class="totalbonuschildnav">
														<p v-show="languagestatus == 1">{{reward.value}}</p>
														<p v-show="languagestatus == 2">{{reward.valueE}}</p>
													</div>
												</div>
											</div>
											<div class="racedetailwarpdownracemoneywarpdeduct">
												<p v-show="languagestatus == 1">*已扣除20％的平台金</p>
												<p v-show="languagestatus == 2">*20% of the platform fee has been deducted</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 上传作品 -->
						<div v-show="designerstatus==1&&remove==0" class="sheji">
							<div class="shejinav" v-show="winstatus == 0&&sort==2" class="">
								<div class="shejititle">
									<img src="./images/racedetail_shejilogo.png">
								</div>
								<div class="uploadworks" v-show="languagestatus == 1">
									<p class="uploadworkstitle">上传作品</p>
									<div class="uploadworkstip">
										<p style="color: #ed0a23;">*上传作品限1张图片，A2规格，简洁排版（最多可上传三个不同设计方案）</p>
									</div>
								</div>
								<div class="uploadworks" v-show="languagestatus == 2">
									<p class="uploadworkstitle">Upload works</p>
									<div class="uploadworkstip">
										<p>（One picture can be uploaded each time, A2 specification, simple typesetting）</p>
										<p>*Different design schemes can be uploaded multiple times (3 upper limits)</p>
										<p>(Note: Photo format is limited to JPG, PNG, JPEG) </p>
									</div>
								</div>
								<div class="worksliststatus" v-show="upPage == 1">
									<div style="display: flex;" id="upimgs">
										<div v-show="itemStatus" class="worksitem" v-for="(item,index) in examinestatus" :key="index">
											<div class="worksitemimg">
												<img class="upworksShow" @click="openupimgs" :src="item.img">
												<div v-show="deletestatus == 0 &&item.status !=1" class="worksitem_close" @click="delWorks(item.id)">
													<img src="./images/closeworks.png">
												</div>
											</div>
											<div class="worksstatus">
												<div class="worksstatusimg">
													<img v-show="item.status == 1" src="./images/status_suc.png">
													<img v-show="item.status == 2" src="./images/status_def.png">
													<img v-show="item.status == 0" src="./images/status_ing.png">
												</div>
												<div class="worksstatustxt">
													<p v-show="item.status == 1 && languagestatus == 1">审核成功</p>
													<p style="cursor: pointer;" v-show="item.status ==2 && languagestatus == 1" @click="openreason(item.id)">审核失败</p>
													<p v-show="item.status ==0 && languagestatus == 1">审核中</p>
													<p v-show="item.status ==1 && languagestatus == 2">Audit successful</p>
													<p v-show="item.status ==2 && languagestatus == 2">Audit failed</p>
													<p v-show="item.status ==0 && languagestatus == 2">Under review</p>
												</div>
											</div>
										</div>
									</div>
									<div v-show="examinestatus.length < 3" class=" worksbg">
										<div class="uploadworks_bg">
											<img :src="upWorks">
											<input type="file" @change="upImageother" class="upworksbtn" />
										</div>
									</div>
								</div>
								<div class="workslist" v-show="upPage == 0">
									<div class="uploadworks_bg">
										<img :src="upWorks" type="file">
										<input type="file" @change="upImage" class="upworksbtn" />
									</div>
								</div>
								<div class="upload_btn" @click="UpWorks">
									<p v-show="languagestatus == 1">上传作品</p>
									<p v-show="languagestatus == 2">Upload works</p>
								</div>
								<div class="upload_choose">
									<div class="upload_choose_check" @click="changUpstatus">
										<img v-if="agree == 1" src="./images/checkbox_icon.png">
										<img v-if="agree == 2" src="./images/checked_icon.png">
									</div>
									<!-- <div class="upload_choose_check" @click="agree = 2">
									</div> -->
									<div class="upload_choose_txt" v-show="languagestatus == 1">
										<p>我已同意</p>
										<span @click="openagreement">《用户协议》</span>
									</div>
									<div class="upload_choose_txt" v-show="languagestatus == 2">
										<p>I have agreed</p>
										<span @click="openagreement">《User agreement》</span>
									</div>
								</div>
							</div>
							<!-- 作品展示 -->
							<div class="shejinav" v-show="winstatus == 1" class="">
								<div class="shejititle">
									<img src="./images/works-logo.png">
								</div>
								<div id="greadimgs">
									<div class="awardsworks" v-for="(prize,index) in prizelist" :key="index">
										<div class="awardsworksimg">
											<img class="greadworksShow" @click="opengreadwork" :src="prize.img">
											<div class="awardsworksimglogo">
												<img v-show="prize.prizestatus == 0" src="images/prize_icon_1.png">
												<img v-show="prize.prizestatus == 1" src="images/prize_icon_2.png">
												<img v-show="prize.prizestatus == 2" src="images/prize_icon_3.png">
												<img v-show="prize.prizestatus == 3" src="images/prize_icon_4.png">
												<img v-show="prize.prizestatus == 4" src="images/prize_icon_5.png">
											</div>
										</div>
										<div class="evaluatewarp showworks">
											<ul>
												<li v-for="(star1,star1index) in starlist2" :key="star1index"><img v-show="prize.rewardscore>=1" :src="prize.rewardscore>star1index?starb:stara"></li>
												<div class="clear"></div>
											</ul>
										</div>
										<div class="awardsworksevaluate">
											<p>{{prize.rewardcomment}}</p>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 提示弹窗 -->
						<div class="judgepopup" v-show="tanchuang1 == 1">
							<div class="judgepopupnav">
								<div class="judgepopupwarp">
									<div class="judgepopupwarpup">
										<img src="./images/revoke_logo.png">
									</div>
									<div class="judgepopupwarpdown">
										<div class="judgepopupwarptxt">
											<p v-show="upStatus == 0&&languagestatus == 1">请勾选用户协议</p>
											<p v-show="upStatus == 1&&languagestatus == 1">上传成功</p>
											<p v-show="upStatus == 2&&languagestatus == 1">您上传的作品已达上限</p>
											<p v-show="upStatus == 3&&languagestatus == 1">正在上传，请稍后</p>
											<p v-show="upStatus == 4&&languagestatus == 1">正在删除，请稍后</p>
											<p v-show="upStatus == 5&&languagestatus == 1">删除成功</p>
											<p v-show="upStatus == 6&&languagestatus == 1">照片不能为空</p>
											<p v-show="upStatus == 7&&languagestatus == 1">您还未登录，请先登录！</p>
											<p v-show="upStatus == 8&&languagestatus == 1">正在撤回，请稍后</p>
											<p v-show="upStatus == 9&&languagestatus == 1">撤销成功</p>
											<p v-show="upStatus == 10&&languagestatus == 1">正在申请，请稍后</p>
											<p v-show="upStatus == 11&&languagestatus == 1">已完成</p>
											<p v-show="upStatus == 12&&languagestatus == 1">评奖完成</p>

											<p v-show="upStatus == 0&&languagestatus == 2">Please check the user agreement</p>
											<p v-show="upStatus == 1&&languagestatus == 2">Upload succeeded</p>
											<p v-show="upStatus == 2&&languagestatus == 2">Your uploaded works have reached the maximum limit</p>
											<p v-show="upStatus == 3&&languagestatus == 2">Uploading, please wait</p>
											<p v-show="upStatus == 4&&languagestatus == 2">Deleting, please wait</p>
											<p v-show="upStatus == 5&&languagestatus == 2">Successfully deleted</p>
											<p v-show="upStatus == 6&&languagestatus == 2">Photo cannot be empty</p>
											<p v-show="upStatus == 7&&languagestatus == 2">You have not logged in, please log in first!</p>
											<p v-show="upStatus == 8&&languagestatus == 2">Withdrawing, please wait</p>
											<p v-show="upStatus == 9&&languagestatus == 2">Successfully cancelled</p>
											<p v-show="upStatus == 10&&languagestatus == 2">Applying, please wait</p>
											<p v-show="upStatus == 11&&languagestatus == 2">Completed</p>
											<p v-show="upStatus == 12&&languagestatus == 2">Award evaluation completed</p>
										</div>
										<div class="judgepopupwarpbtn">
											<!-- <div class="judgepopupwarpbtnitem" @click="">
												<p>取消</p>
											</div> -->
											<div v-show="upOther" class="judgepopupwarpbtnitem judgepopupwarpbtnactive" @click="closeagreement">
												<p v-show="languagestatus == 1">确认</p>
												<p v-show="languagestatus == 2">confirm</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 确定提示 -->
						<div class="judgepopup" v-show="tanchuang2 == 1">
							<div class="judgepopupnav">
								<div class="judgepopupwarp">
									<div class="judgepopupwarpup">
										<img src="./images/revoke_logo.png">
									</div>
									<div class="judgepopupwarpdown">
										<div class="judgepopupwarptxt">
											<p v-show="loginstatus == 1&&languagestatus == 1">是否确定上传作品</p>
											<p v-show="loginstatus == 2&&languagestatus == 1">是否确定删除该作品</p>
											<p v-show="loginstatus == 3&&languagestatus == 1">是否确定完成该竞赛</p>
											<p v-show="loginstatus == 1&&languagestatus == 2">Are you sure you want to upload the works</p>
											<p v-show="loginstatus == 2&&languagestatus == 2">Are you sure you want to delete the work</p>
											<p v-show="loginstatus == 3&&languagestatus == 2">Are you sure you want to finish the competition</p>
										</div>
										<div class="judgepopupwarpbtn">
											<div class="judgepopupwarpbtnitem" @click="Upclose">
												<p v-show="languagestatus == 1">取消</p>
												<p v-show="languagestatus == 2">cancel</p>
											</div>
											<div class="judgepopupwarpbtnitem judgepopupwarpbtnactive" @click="Upcomfire(pagelist.id)">
												<p v-show="languagestatus == 1">确认</p>
												<p v-show="languagestatus == 2">confirm</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="judgepopup" v-show="tanchuang3 == 1">
							<div class="judgepopupnav">
								<div class="judgepopupwarp">
									<div class="judgepopupwarpup">
										<img src="./images/revoke_logo.png">
									</div>
									<div class="judgepopupwarpdown">
										<div class="judgepopupwarptxt">
											<p v-show="completestatus == 1 &&languagestatus == 1">是否确定完成该竞赛</p>
											<p v-show="completestatus == 1 &&languagestatus == 2">Are you sure you want to finish the competition</p>
										</div>
										<div class="judgepopupwarpbtn">
											<div class="judgepopupwarpbtnitem" @click="Upclose">
												<p v-show="languagestatus == 1">取消</p>
												<p v-show="languagestatus == 2">cancel</p>
											</div>
											<div class="judgepopupwarpbtnitem judgepopupwarpbtnactive" @click="surecompleterace">
												<p v-show="languagestatus == 1">确认</p>
												<p v-show="languagestatus == 2">confirm</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 确定选中 -->
						<div v-show="winpage == 1 && designerstatus == 0" class="comfirechoose">
							<div class="comfirechooseimg">
								<img src="./images/competition_logo.png">
							</div>
							<div class="comfirechooseworks">
								<div class="comfirechooseworkslist" id="prizeImgId">
									<div class="comfirechooseworksitem" v-for="(item,index) in winworks" :key="index">
										<div class="competitionworkitemnav">
											<img class="prizeimg" @click="openprize" :src="item.image">
											<div class="comfirechooseworksitemimg">
												<img v-show="item.prizestatus == 0" src="./images/prize_icon_1.png">
												<img v-show="item.prizestatus == 1" src="./images/prize_icon_2.png">
												<img v-show="item.prizestatus == 2" src="./images/prize_icon_3.png">
												<img v-show="item.prizestatus == 3" src="./images/prize_icon_4.png">
											</div>
										</div>
										<div class="evaluatewarp">
											<ul>
												<li v-for="(star,starindex) in starlist1 " :key="starindex"><img v-show="item.score >= 1" :src="item.score>starindex?starb:stara"></li>
												<div class="clear"></div>
											</ul>
										</div>
										<!-- 参赛作品 -->
										<div class="competitionworkitemworker">
											<div class="competitionworkitemworkerup">
												<div class="competitionworkitemworkerupper">
													<div class="competitionworkitemworkerupperimg">
														<img :src="item.avatar">
													</div>
													<div class="competitionworkitemworkeruppername">
														<p>{{item.nickname}}</p>
													</div>
												</div>
												<div class="comfirechooseworkslistimg" @click="openchat(item.userid,item.nickname)">
													<img src="./images/mes_icon.png">
												</div>
											</div>
											<div class="competitionworkitemworkerdown">
												<p>{{item.createtime}}</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 参赛作品 -->
						<div v-show="designerstatus==0&&remove==0" class="competition">
							<div class="competitiontitle">
								<img src="./images/competition_logo.png">
							</div>
							<div class="competitiontotalnum">
								<div class="competitiontotalnumle" v-show="languagestatus == 1">
									<p>共<span>{{workscount}}</span>作品</p>
								</div>
								<div class="competitiontotalnumle" v-show="languagestatus == 2">
									<p><span>{{workscount}}</span>work in total</p>
								</div>
								<div v-show="raceendstatus == 1" class="competitiontotalnumri">
									<div v-show="raceback == 0" class="competitiontotalnumrichehui" @click="openchehui">
										<p v-show="languagestatus == 1">撤销</p>
										<p v-show="languagestatus == 2">Revoke</p>
									</div>
									<div class="competitiontotalnumricomplete" @click="completerace">
										<p v-show="languagestatus == 1">完成</p>
										<p v-show="languagestatus == 2">complete</p>
									</div>
								</div>
							</div>
							<div class="competitionlist" id="getId">
								<div v-show="workscount>0" class="competitionworkitem" v-for="(works,index) in workslist" :key="index">
									<div class="competitionworkitemnav">
										<img v-show="designercomplete == 0" :src="works">
										<img v-show="designercomplete == 1" class="imgs" @click="parviewimages" :src="works.worksimage">
										<div v-show="designercomplete == 0" class="competitionworkitembg"></div>
										<div v-show="designercomplete == 0" class="competitionworkitemimg">
											<img src="./images/zhaopian.png">
										</div>
									</div>
									<!-- 参赛作品 -->
									<div class="competitionworkitemworker" v-show="designercomplete == 1">
										<div class="competitionworkitemworkerup">
											<div class="competitionworkitemworkerupper">
												<div class="competitionworkitemworkerupperimg">
													<img :src="works.worksuseravatar">
												</div>
												<div class="competitionworkitemworkeruppername">
													<p>{{works.worksusername}}</p>
												</div>
											</div>
											<div class="competitionworkitemworkerupbtn" @click="openpingjiang(works.worksid,works.worksuserid)">
												<p v-show="languagestatus == 1">选中</p>
												<p v-show="languagestatus == 2">Select</p>
											</div>
										</div>
										<div class="competitionworkitemworkerdown">
											<p>{{works.workscreatetime}}</p>
										</div>
									</div>
								</div>
								<div v-show="workscount==0" class="competitionworkempty">
									<div>
										<img src="./images/empty.png">
									</div>
								</div>
							</div>
							<div v-show="pagenum > 1" class="fenye">
								<ul>
									<li class="fenyeitem" @click="getcur(nowpage-1 == 0?1:nowpage-1)"><img src="./images/prve_icon.png"></li>
									<li v-for="item in pagenum" @click="getcur(item)" :class="{showeffect :item ==nowpage?true:false}">{{item}}</li>
									<li @click="getcur(nowpage+1>pagenum?pagenum:nowpage+1)"><img src="./images/next_icon.png"></li>
									<div class="clear"></div>
								</ul>
							</div>
						</div>
						<!-- 撤销弹窗 -->
						<div class="revoke" v-show="chehuipage == 1">
							<div class="revokenav">
								<div class="revokewarp">
									<div class="revokewarpimg">
										<img src="./images/revoke_logo.png">
										<div class="revokewarpicon" @click="closepopup">
											<img src="./images/close_icon.png">
										</div>
									</div>
									<div class="revokewarpcontent" v-show="languagestatus == 1">
										<div class="revokewarpcontenttxt">
											<p class="revokewarpcontenttxttitle">当前参赛作品未达到最低数量，是否免费撤销？</p>
											<p class="revokewarpcontenttxttip">（撤销将无法看到已提交作品）</p>
										</div>
										<div class="revokewarpcontentbtn">
											<div class="revokewarpcontentaccept revokewarpcontentbtnitem" @click="closepopup">
												<p>接受</p>
											</div>
											<div class="revokewarpcontentrevoke revokewarpcontentbtnitem" @click="revokerace">
												<p>撤销</p>
											</div>
										</div>
									</div>
									<div class="revokewarpcontent" v-show="languagestatus == 2">
										<div class="revokewarpcontenttxt">
											<p class="revokewarpcontenttxttitle">If the current number of entries does not reach the minimum, do you
												want to cancel them for free?</p>
											<p class="revokewarpcontenttxttip">(you will not be able to see the submitted works if you withdraw)</p>
										</div>
										<div class="revokewarpcontentbtn">
											<div class="revokewarpcontentaccept revokewarpcontentbtnitem" @click="closepopup">
												<p v-show="languagestatus == 1">接受</p>
												<p v-show="languagestatus == 2">accept</p>
											</div>
											<div class="revokewarpcontentrevoke revokewarpcontentbtnitem" @click="revokerace">
												<p v-show="languagestatus == 1">撤销</p>
												<p v-show="languagestatus == 2">revoke</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 评奖弹窗 -->
						<div v-show="pingjiangpage == 1" class="grade">
							<div class="gradenav">
								<div class="gradewarp">
									<div class="gradewarpup">
										<img src="./images/revoke_logo.png">
										<div class="gradewarpupimg" @click="closepingjia">
											<img src="./images/close_icon.png">
										</div>
									</div>
									<div class="gradewarpdown">
										<div class="gradewarpdowntitle">
											<p v-show="languagestatus == 1">请仔细确认选中作品是否正确，选中后无法修改</p>
											<p v-show="languagestatus == 2">Please carefully confirm whether the selected works are correct. You cannot
												modify them after selecting them</p>
										</div>
										<div class="gradewarpdownchoose">
											<div class="gradewarpdownchoosetip">
												<p v-show="languagestatus == 1">作品等级</p>
												<p v-show="languagestatus == 2">Work level</p>
											</div>
											<div class="gradewarpdownchoosewarp">
												<div class="">
													<div class="prize">
														<div class="prizetitle" @click="choosetype">
															<p>{{prizename}}</p>
														</div>
														<div class="prizeselest" v-show="shooseprize == 1">
															<p @click="chooseprize(index)" class="prizenav" v-for="(dengji,index) in prizelistcom" :key="index">{{dengji.name}}</p>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="evaluate">
											<div class="evaluatetip">
												<p v-show="languagestatus == 1">作品评价</p>
												<p v-show="languagestatus == 2">Work evaluation</p>
											</div>
											<div class="evaluatewarp">
												<ul>
													<li v-for="(star,index) in starlist" :key="index" @click="clickStars(index)"><img :src="xing>index?starb:stara"></li>
													<div class="clear"></div>
												</ul>
											</div>
										</div>
										<div class="comment">
											<div class="commenttip">
												<p v-show="languagestatus == 1">作品评语</p>
												<p v-show="languagestatus == 2">Comments on works</p>
											</div>
											<div class="commentwarp">
												<textarea v-model="worksevaluate" class="commentwarptxt" rows="5" cols=""></textarea>
											</div>
										</div>
										<div class="gradeworksbtn">
											<div class="gradeworksbtncomfire gradeworksbtnitem" @click="comfirechoice">
												<p v-show="languagestatus == 1">确认</p>
												<p v-show="languagestatus == 2">comfire</p>
											</div>
											<div class="gradeworksbtnconsle gradeworksbtnitem" @click="consolechoice">
												<p v-show="languagestatus == 1">取消</p>
												<p v-show="languagestatus == 2">cancel</p>
											</div>
										</div>
										<div class="gradewarptip">
											<p v-show="languagestatus == 1">期待您后续上传作品的市场信息 ，将是对设计者和平台莫大的鼓励和支持，通过后<span>平台将返还1％的发布金至您的钱包。</span></p>
											<p v-show="languagestatus == 2">We hope that the market information of your works will be a great
												encouragement and support to the designers and the platform<span>The platform will return 1% of the release
													money to your wallet.</span></p>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 退款 -->
						<div class="revoke" v-show="refundpopup == 1">
							<div class="revokenav">
								<div class="revokewarp">
									<div class="revokewarpimg">
										<img src="./images/revoke_logo.png">
									</div>
									<div class="revokewarpcontent">
										<div class="revokewarpcontenttxt">
											<p class="revokewarpcontenttxttitle" v-show="languagestatus == 1">是否确定退款<span>(发布6小时内)</span></p>
											<p class="revokewarpcontenttxttitle" v-show="languagestatus == 2">Are you sure you want to refund<span>(Within 6 days of release)</span></p>
											<p class="" v-show="languagestatus == 1">非押金用户将扣除5%发布金</p>
											<p class="" v-show="languagestatus == 2">Non deposit users will deduct 5% of the release fee<strong></strong></p>
										</div>
										<div class="revokewarpcontentbtn">
											<div class="revokewarpcontentaccept revokewarpcontentbtnitem" @click="closerefundpopup">
												<p v-show="languagestatus == 1">取消</p>
												<p v-show="languagestatus == 2">cancel</p>
											</div>
											<div class="revokewarpcontentrevoke revokewarpcontentbtnitem" @click="refundbtn">
												<p v-show="languagestatus == 1">确认</p>
												<p v-show="languagestatus == 2">determine</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 交押金编辑 -->
						<div class="revoke" v-show="Editpopupmoney == 1">
							<div class="revokenav">
								<div class="editwarp">
									<div class="revokewarpimg">
										<img src="./images/revoke_logo.png">
									</div>
									<div class="editwarptip" v-show="languagestatus == 1"><p>竞赛期间仅有1次调整机会</p></div>
									<div class="editwarptip" v-show="languagestatus == 2"><p>There is only one adjustment opportunity during the competition</p></div>
									<div class="editwarpcontent">
										<div class="editwarpcontentwarp">
											<div class="editwarpdata">
												<p v-show="languagestatus == 1">延长竞赛日期</p>
												<p v-show="languagestatus == 2">Extension of competition date</p>
												<div class="editwarpdatachoice">
													<el-date-picker v-show="languagestatus == 1" v-model="value2" type="datetime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" placeholder="选择日期时间" align="right"></el-date-picker>
													<el-date-picker v-show="languagestatus == 2" v-model="value2" type="datetime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" placeholder="Select date time" align="right"></el-date-picker>
												</div>
											</div>
											<div class="editwarpdata editwarpdescribe">
												<p v-show="languagestatus == 1">竞赛描述</p>
												<p v-show="languagestatus == 2">Competition description</p>
												<div class="editwarpdatachoice">
													<textarea name="content" lay-verify="content" id="textedit" class="releasetwodatatxtmore" rows="4" cols=""></textarea>
												</div>
											</div>
										</div>
										<div class="revokewarpcontentbtn">
											<div class="revokewarpcontentaccept revokewarpcontentbtnitem" @click="closeEditmoneypopup">
												<p v-show="languagestatus == 1">取消</p>
												<p v-show="languagestatus == 2">cancel</p>
											</div>
											<div class="revokewarpcontentrevoke revokewarpcontentbtnitem" @click="Editmoneybtn">
												<p v-show="languagestatus == 1">确认</p>
												<p v-show="languagestatus == 2">determine</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 编辑提示 -->
						<div class="revoke" v-show="tipeditchuang == 1">
							<div class="revokenav">
								<div class="revokewarp">
									<div class="revokewarpimg">
										<img src="./images/revoke_logo.png">
									</div>
									<div class="revokewarpcontent">
										<div class="revokewarpcontenttxt">
											<p class="revokewarpcontenttxttitle" style="text-align: center;">{{editTip}}</p>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 没交押金 -->
						<div class="revoke" v-show="Editpopup == 1">
							<div class="revokenav">
								<div class="editwarp">
									<div class="revokewarpimg">
										<img src="./images/revoke_logo.png">
									</div>
									<div class="editwarpcontent">
										<div class="editwarpcontenttxt">
											<p class="Editwarpcontenttxttitle" v-show="languagestatus == 1">仅押金用户享有1次编辑权利，请移步至<span @click="Topersonpage">我的押金</span></p>
											<p class="Editwarpcontenttxttitle" v-show="languagestatus == 2">Only deposit users have the right to edit once.Please move to<span>My deposit</span></p>
										</div>
										<div class="Editwarpcontentbtn">
											<div class="revokewarpcontentrevoke revokewarpcontentbtnitem" @click="closeEditpopup">
												<p v-show="languagestatus == 1">确认</p>
												<p v-show="languagestatus == 2">determine</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="revoke" v-show="tiptanchuang == 1">
							<div class="revokenav">
								<div class="revokewarp">
									<div class="revokewarpimg">
										<img src="./images/revoke_logo.png">
										<div class="revokewarpicon" @click="closepopup">
											<img src="./images/close_icon.png">
										</div>
									</div>
									<div class="revokewarpcontent">
										<div class="revokewarpcontenttxt">
											<p class="revokewarpcontenttxttitle" v-show="languagestatus == 1">退款成功</p>
											<p class="revokewarpcontenttxttitle" v-show="languagestatus == 2">Refund successful</p>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- 用户协议 审核失败原因 -->
						<div class="judgepopup" v-show="agreementtip == 1">
							<div class="judgepopupnav">
								<div class="agreementtipwarp">
									<div class="judgepopupwarpup">
										<img src="./images/revoke_logo.png">
									</div>
									<div class="judgepopupwarpdown">
										<div class="agreementtitle" v-if="agreeReason">
											<p v-show="languagestatus == 1">审核失败原因</p>
											<p v-show="languagestatus == 2">Reasons for audit failure</p>
										</div>
										<div class="agreementtitle" v-else>
											<p v-show="languagestatus == 1">用户协议</p>
											<p v-show="languagestatus == 2">User agreement</p>
										</div>
										<div class="agreementwarp" v-if="agreeReason">
											<p v-show="languagestatus == 1">{{falireason}}</p>
											<p v-show="languagestatus == 2">{{falireasonE}}</p>
										</div>
										<div class="agreementwarp" v-else>
											<p v-show="languagestatus == 1" v-html="usercontent"></p>
											<p v-show="languagestatus == 2" v-html="userEcontent"></p>
										</div>
										<div class="judgepopupwarpbtn">
											<div class="judgepopupwarpbtnitem judgepopupwarpbtnactive" v-if="agreeReason" @click="closeagreementtip">
												<p v-show="languagestatus == 1">关闭</p>
												<p v-show="languagestatus == 2">Close</p>
											</div>
											<div class="judgepopupwarpbtnitem judgepopupwarpbtnactive" v-else @click="closeagreementtip">
												<p v-show="languagestatus == 1">同意</p>
												<p v-show="languagestatus == 2">Agree</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div id="raceside" class="col-lg-4 col-md-4">
						<script src="js/racesidebar.js" type="text/javascript"></script>
					</div>
				</div>
			</div>
		</div>
		<script src="js/pcFooter.js" type="text/javascript"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
		<script src="viewer/dist/viewer.min.js"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
		<script src="js/element.js"></script>
		<script src="./layui/layui.js"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.0/axios.min.js"></script>
		<script type="text/javascript">
			var index, layedit;
			
			let rightside = new Vue({
				el: '#rightside',
				data:{
					starlist:[1,2,3,4,5],
					starlist1:[1,2,3,4,5],
					starlist2:[1,2,3,4,5],
					xing:0,
					stara:'./images/starhover.png',
					starb:'./images/star.png',
					designitem: 1,
					upWorks: './images/upload_bg.png',
					agree: 1,
					agreejudge: true,
					tanchuang1: 0,
					tanchuang2: 0,
					tanchuang3: 0,
					previewpage:0,
					agreementtip:0,
					pingjiangpage:0,
					pagelist: [],
					rewardlist: [],
					pageId: '',
					userid:'',
					token:'',
					formData:'',
					loginstatus:0,
					completestatus:0,
					itemStatus:true,
					upStatus:0,
					upOther:true,
					upPage:0,
					file:'',
					fileother:'',
					upimage:'',
					upImagepage:'',
					examinestatus:[],
					prizelist:[],
					worksid:'',
					designerstatus:1,
					designercomplete:'',
					workscount:'',
					raceendstatus:'',
					winstatus:0,
					workslist:[],
					chehuipage:0,
					raceid:'',
					remove:0,
					raceback:'',
					prizelistcom:[],
					prizename:'请选择',
					shooseprize:0,
					rewardid:'',
					wordsid:'',
					workuserid:'',
					worksevaluate:'',
					winpage:0,
					winworks:[],
					pagenum:'',
					nowpage:1,
					refund:'',
					refundpopup:0,
					tiptanchuang:0,
					languagestatus:'',
					refunding:0,
					usercontent:'',
					userEcontent:'',
					deletestatus:'',
					agreeReason:true,
					falireason:'',
					falireasonE:'',
					sort:'',
					edit:'',
					Editpopup:0,  //没有押金时弹窗
					Editpopupmoney:0,  //有押金时弹窗
					value2:'',
					datatime:''  ,//时间戳
					editcontent:''  ,//再次编辑的内容
					tipeditchuang:0,
					editTip:'',
					desopit:'',  //押金状态
					edittext:''
				},
				created:function() {
					// this.getwininglist()
				},
				mounted:function() {
					let that = this
					
					// 富文本
					layui.use('layedit', function() {
						layedit = layui.layedit
						// layedit.build('textedit')
						layedit.set({
							height: 180,
							uploadImage: {
								url: 'http://admin.yiyulihua.com/api/sheji.basics/contentupload',
								type: 'post'
							},
						})
						index = layedit.build('textedit')
					
					})
					
					var theRequest = new Object()
					var url = location.search
					if (url.indexOf("?") != -1) {
						var str = url.substr(1); //substr()方法返回从参数值开始到结束的字符串；  
						var strs = str.split("&");
						for (var i = 0; i < strs.length; i++) {
							theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
						}
						// console.log( theRequest ); //此时的theRequest就是我们需要的参数；  
						that.pageId = theRequest.id
					}
					if (localStorage.getItem('logininfo')) {
						let obj = JSON.parse(localStorage.getItem('logininfo'));
						that.loginstatus = 1
						that.userid = obj.userid
						that.token = obj.token
					}
					if (localStorage.getItem('userinfo')) {
						let obj = JSON.parse(localStorage.getItem('userinfo'));
						that.loginstatus = 1
						that.username = obj.nickname
						that.icon = obj.avatar
					}
					if (sessionStorage.getItem('languagestatus')) {
						let languagestatus = sessionStorage.getItem('languagestatus')
						this.languagestatus = languagestatus
					}
					that.getpagelist()
					that.getexaminestatus()
					that.$refs.allpopup.style.display = 'block'
				},
				methods: {
					// 预览
					parviewimages(){
						let viewer = new Viewer(document.getElementById('getId'), {
							// 配置\
							filter(selector){
								return selector.className == 'imgs' ? true : false; 
							}
						})
					},
					openupimgs(){
						let viewer = new Viewer(document.getElementById('upimgs'), {
							// 配置\
							filter(selector){
								return selector.className == 'upworksShow' ? true : false; 
							}
						})
					},
					opengreadwork(){
						let viewer = new Viewer(document.getElementById('greadimgs'), {
							// 配置\
							filter(selector){
								return selector.className == 'greadworksShow' ? true : false; 
							}
						})
					},
					openprize(){
						let viewer = new Viewer(document.getElementById('prizeImgId'), {
							// 配置\
							filter(selector){
								return selector.className == 'prizeimg' ? true : false; 
							}
						})
					},
					// 时间
					add0(m){return m<10?'0'+m:m },
					getLocalTime(nS) {
					   let time = new Date(parseInt(nS)*1000);
					   var y = time.getFullYear();
					   var m = time.getMonth()+1;
					   var d = time.getDate();
					   var h = time.getHours();
					   var mm = time.getMinutes();
					   var s = time.getSeconds();
					   return y+'/'+this.add0(m)+'/'+this.add0(d)+' '+this.add0(h)+':'+this.add0(mm);
					},
					// 获取用户协议
					getuseragreementinfo:function(){
						let that = this
						axios.get('http://admin.yiyulihua.com/api/sheji.index/agreement',{
							params:{
								
							}
						})
						.then((res) =>{
							if(res.data.code == 1){
								that.usercontent = res.data.data.usercontent
								that.userEcontent = res.data.data.userEcontent
								console.log(111)
							}
						})
					},
					// 获取数据
					getpagelist: function() {
						let that = this
						axios.get('http://admin.yiyulihua.com/api/sheji.competition/details', {
								params: {
									id:that.pageId,
									userid:that.userid,
									token:that.token
								}
							})
							.then((res) => {
								that.pagelist = res.data.data.competition
								that.refund = res.data.data.refund
								that.edit = res.data.data.edit
								that.desopit = res.data.data.desopit
								that.edittext = res.data.data.edittext
								that.rewardlist = res.data.data.competition.reward
								that.raceid = res.data.data.competition.id
								that.remove = res.data.data.competition.remove
								that.sort = res.data.data.competition.sort
								that.getwininglist()
								let list = res.data.data.competition
								res.data.data.competition.endtime = that.getLocalTime(res.data.data.competition.endtime)
								res.data.data.competition.createtime = that.getLocalTime(res.data.data.competition.createtime)
							})
					},
					// 审核状态数据
					getexaminestatus:function(){
						let that = this
						axios.get('http://admin.yiyulihua.com/api/sheji.competition/competitionWorks',{
							params:{
								userid:that.userid,
								token:that.token,
								id:that.pageId,
								page:that.nowpage
							}
						})
						.then((res) =>{
							if(res.data.code == 1){
								if(that.token != ''){
									if(res.data.data.designer === 1){//designer == 1 设计师
										that.prizelist = res.data.data.userworks
										that.examinestatus = res.data.data.userworks
										if(res.data.data.userworks.length<=0){
											that.winstatus = 0
										}else{
											that.winstatus = res.data.data.rewardstatus  //评价状态
										}
										that.deletestatus = res.data.data.delete
										if(that.examinestatus.length > 0){
											that.upPage = 1
										}
									}else if(res.data.data.designer === 1 && res.data.data.complete == 1){//designer == 1 设计师
										that.workslist = res.data.data.works
										let list = res.data.data.works
										list.forEach(item =>{
											item.endtime = that.getLocalTime(item.endtime)
										})
										
									}else if(res.data.data.designer === 0){//designer == 0 发布者
										that.raceback = res.data.data.removestatus
										that.designercomplete = res.data.data.complete
										that.workscount = res.data.data.count
										that.raceendstatus = res.data.data.endstatus
										that.designerstatus = res.data.data.designer
										that.workslist = res.data.data.works
										if(res.data.data.works.length>8){
											res.data.data.works.length = 8
										}
										that.pagenum = res.data.data.pagenum
									}
								}else if(that.token==''){
									that.designerstatus = 1
									that.remove = 0
								}
							}
							
						})
					},
					// 作品奖项
					getrewardType:function(){
						let that = this
						axios.get('http://admin.yiyulihua.com/api/sheji.competition/rewardType',{
							params:{
								userid:that.userid,
								token:that.token,
								id:that.raceid
							}
						})
						.then((res) =>{
							that.prizelistcom = res.data.data.reward
						})
					},
					// 作品获奖展示
					getwininglist:function(obj){
						let that = this
						axios.get('http://admin.yiyulihua.com/api/sheji.competition/rewardWorks',{
							params:{
								id:that.raceid,
							}
						})
						.then((res) =>{
							if(res.data.code == 1){
								that.winworks = res.data.data.rewardworks
								let list = res.data.data.rewardworks
								list.forEach(item =>{
									item.createtime = that.getLocalTime(item.createtime)
								})
								if(res.data.data.rewardworks.length>0){
									that.winpage = 1
								}
							}
						})
					},
					// 分页
					getcur:function(i){
						let that = this
						that.nowpage = i
						that.getexaminestatus()
					},
					// 用户协议
					changUpstatus: function() {
						let that = this
						if (that.agreejudge) {
							that.agree = 2
						} else {
							that.agree = 1
						}
						that.agreejudge = !that.agreejudge
					},
					// 上传作品
					UpWorks: function() {
						let that = this
						// console.log(that.token)
						if (that.token == '') {
							that.upStatus = 7
							that.tanchuang1 = 1
						} else if(that.upPage == 0 && that.agree == 1 && that.token != ''){
							that.upStatus = 0
							that.tanchuang1 = 1
						}else if(that.upPage == 0 && that.agree == 2 && that.upimage == ''){
							that.loginstatus = 1
							that.tanchuang2 = 1
						}else if(that.upPage == 1 && that.agree == 1){
							that.upStatus = 0
							that.tanchuang1 = 1
						}else if(that.upPage == 1 && that.agree == 2 && that.examinestatus.length < 3){
							that.loginstatus = 1
							that.tanchuang2 = 1
						}else if(that.upPage == 1 && that.agree == 2 && that.examinestatus.length >= 3){
							that.upStatus = 2
							that.tanchuang1 = 1
						}
						if(that.upPage == 0 && that.agree == 2 && that.token != ''){
							that.loginstatus = 1
							that.tanchuang2 = 1
						}
					},
					// 关闭勾选弹窗
					closeagreement: function() {
						let that = this
						if(that.upStatus == 0 || that.upStatus == 2){
							that.tanchuang1 = 0
						}else if(that.upStatus == 1 && that.upPage == 0){
							that.tanchuang1 = 0
							that.getexaminestatus()
							that.upWorks = './images/upload_bg.png'
						}else if(that.upStatus == 1 && that.upPage == 1){
							that.tanchuang1 = 0
							that.getexaminestatus()
							that.upWorks = './images/upload_bg.png'
						}else if(that.upStatus == 2 && that.upPage == 1){
							that.tanchuang1 = 0
						}else{
							that.tanchuang1 = 0
							that.getexaminestatus()
						}
						
						if(that.upStatus == 12){
							that.tanchuang1 = 0
							that.getexaminestatus()
							that.getwininglist()
						}
					},
					// 关闭上传弹窗
					Upclose: function() {
						this.tanchuang2 = 0
						this.tanchuang3 = 0
					},
					// 上传图片
					upImage: function(e) {
						// console.log(e);
						var that = this;
						var file = e.target.files[0];
						var formData = new FormData();
						that.file = file;
						formData.append("file", file);
						
						// console.log(formData)
						// console.log(file)
						// that.formData = formData
						if (file) {
							this.file = file;
							// console.log(this.file);
							var reader = new FileReader();
							// var that = this;
							reader.readAsDataURL(file);
							reader.onload = function() {
								// 这里的this 指向reader
								that.upWorks = this.result;
								that.fileStatus = false;
								// console.log(that.upWorks)
							};
						}
						axios.post('http://admin.yiyulihua.com/api/sheji.basics/upload',formData)
						.then((res) =>{
							// console.log(res)
							that.upimage = res.data.data.url
						})
					},
					// page = 1上传图片
					upImageother:function(e){
						console.log(e);
						var that = this;
						var file = e.target.files[0];
						var formData = new FormData();
						that.fileother = file;
						formData.append("file", file);
						
						if (file) {
							this.file = file;
							// console.log(this.file);
							var reader = new FileReader();
							// var that = this;
							reader.readAsDataURL(file);
							reader.onload = function() {
								// 这里的this 指向reader
								that.upWorks = this.result;
								that.fileStatus = false;
								// console.log(that.upWorks)
							};
						}
						axios.post('http://admin.yiyulihua.com/api/sheji.basics/upload',formData)
						.then((res) =>{
							// console.log(res)
							that.upImagepage = res.data.data.url
						})
					},
					// 确定上传图片
					Upcomfire:function(id){
						let that = this
						if(that.upPage == 0){
							axios.post('http://admin.yiyulihua.com/api/sheji.works/add',{
								userid:that.userid,
								token:that.token,
								competitionid:id,
								image:that.upimage
							})
							.then((res) =>{
								if(that.token == ''){
									that.tanchuang2 = 0
									that.upStatus = 7
									that.tanchuang1 = 1
								}else{
									if(res.data.code == 1){
										that.tanchuang2 = 0
										that.upStatus = 3
										that.tanchuang1 = 1
										that.upOther = false
										setTimeout(function(){
											that.upStatus = 1
											that.tanchuang1 = 1
											that.upOther = true	
										},800)
										
									}
									if(res.data.code == 0){
										that.tanchuang2 = 0
										that.upStatus = 3
										that.tanchuang1 = 1
										that.upOther = false
										setTimeout(function(){
											that.upStatus = 6
											that.tanchuang1 = 1
											that.upOther = true	
										},800)
									}
								}
								// console.log(res)
							})
						}else if(that.upPage == 1 && that.loginstatus == 1){
							axios.post('http://admin.yiyulihua.com/api/sheji.works/add',{
								userid:that.userid,
								token:that.token,
								competitionid:id,
								image:that.upImagepage
							})
							.then((res) =>{
								if(res.data.code == 1){
									that.tanchuang2 = 0
									that.upStatus = 3
									that.tanchuang1 = 1
									that.upOther = false
									setTimeout(function(){
										that.upStatus = 1
										that.tanchuang1 = 1
										that.upOther = true	
									},800)
								}
								if(res.data.code == 0){
									that.tanchuang2 = 0
									that.upStatus = 3
									that.tanchuang1 = 1
									that.upOther = false
									setTimeout(function(){
										that.upStatus = 6
										that.tanchuang1 = 1
										that.upOther = true
									},800)
								}
							})
						}else if(that.upPage == 1 && that.loginstatus == 2){
							axios.get('http://admin.yiyulihua.com/api/sheji.works/del',{
								params:{
									userid:that.userid,
									token:that.token,
									competitionid:that.pageId,
									worksid:that.worksid
								}
							})
							.then((res) =>{
								if(res.data.code == 1){
									that.tanchuang2 = 0
									that.upStatus = 4
									that.tanchuang1 = 1
									that.upOther = false
									setTimeout(function(){
										that.upStatus = 5
										that.tanchuang1 = 1
										that.upOther = true
										that.itemStatus = false
									},800)
									location.reload()
								}
								// console.log(res)
							})
						}
					},
					// 删除作品
					delWorks: function(id) {
						let that = this
						that.loginstatus = 2
						that.tanchuang2 = 1
						that.worksid = id
						
						// console.log(that.worksid)
					},
					// 打开撤回弹窗
					openchehui:function(){
						this.chehuipage = 1
					},
					// 取消撤回弹窗
					closepopup:function(){
						let that = this
						that.chehuipage = 0
					},
					// 确定撤销
					revokerace:function(){
						let that = this
						axios.get('http://admin.yiyulihua.com/api/sheji.competition/competitionComplete',{
							params:{
								userid:that.userid,
								token:that.token,
								id:that.raceid,
								type:1,
								languagestatus:that.languagestatus
							}
						})
						.then((res) =>{
							if(res.data.code == 1){
								that.chehuipage = 0
								that.upStatus = 8
								that.tanchuang1 = 1
								that.upOther = false
								setTimeout(function(){
									that.upStatus = 9
									that.tanchuang1 = 1
									that.upOther = true
								},800)
							}
							// console.log(res)
						})
					},
					// 打开完成页面
					completerace:function(){
						let that = this
						that.completestatus = 1
						that.tanchuang3 = 1
					},
					// 确定完成
					surecompleterace:function(){
						let that = this
						axios.get('http://admin.yiyulihua.com/api/sheji.competition/competitionComplete',{
							params:{
								userid:that.userid,
								token:that.token,
								id:that.raceid,
								type:0
							}
						})
						.then((res) =>{
							if(res.data.code == 1){
								that.tanchuang3 = 0
								that.upStatus = 10
								that.tanchuang1 = 1
								that.upOther = false
								setTimeout(function(){
									that.upStatus = 11
									that.tanchuang1 = 1
									that.upOther = true
									location.reload()
								},800)
							}
						})
					},
					// 打开评奖弹窗
					openpingjiang:function(id,userid){
						let that = this
						that.wordsid = id
						that.workuserid = userid
						that.pingjiangpage = 1
						that.getrewardType()
					},
					//关闭评奖弹窗
					closepingjia:function(){
						this.pingjiangpage = 0
					},
					// 评星
					clickStars:function(i){
						let that = this
						that.xing = i+1
						that.fraction = that.starlist[i]
					},
					// 打开下拉框
					choosetype:function(){
						let that = this
						that.shooseprize = 1
					},
					// 确定选中
					chooseprize:function(i){
						let that = this
						that.rewardid = that.prizelistcom[i].id
						that.prizename= that.prizelistcom[i].name
						that.shooseprize = 0
					},
					// 确定选中作品
					comfirechoice:function(){
						let that = this
						axios.get('http://admin.yiyulihua.com/api/sheji.competition/reward',{
							params:{
								userid:that.userid,
								token:that.token,
								workuserid:that.workuserid,
								worksid:that.wordsid,
								competitionid:that.raceid,
								score:that.fraction,
								content:that.worksevaluate,
								rewardid:that.rewardid,
							}
						})
						.then((res) =>{
							if(res.data.code == 1){
								that.pingjiangpage = 0
								that.upStatus = 3
								that.tanchuang1 = 1
								that.upOther = false
								setTimeout(function(){
									that.upStatus = 12
									that.tanchuang1 = 1
									that.upOther = true
									location.reload()
								},800)
								
							}
						})
					},
					
					// 取消
					consolechoice:function(){
						let that = this
						that.pingjiangpage = 0
					},
					openchat:function(id,nickname){
						window.location.href = 'personalcenter.html?id='+id+'&nickname='+nickname+'&raceid='+this.pageId
					},
					// 打开退款弹窗
					openrefundpopup:function(){
						this.refundpopup = 1
					},
					// 关闭退款弹窗
					closerefundpopup:function(){
						this.refundpopup = 0
					},
					// 退款
					refundbtn:function(){
						let that = this
						this.refundpopup = 0
						axios.get('http://admin.yiyulihua.com/api/sheji.pay/competitionRefund',{
							params:{
								userid:that.userid,
								id:that.pageId
							}
						})
						.then((res)=>{
							if(res.data.code == 1){
								that.tiptanchuang=1
								setTimeout(function(){
									that.tiptanchuang = 0
									that.refunding = 1
									location.reload()
								},1300)
							}
						})
					},
					// 再次编辑接口
					geteditagain:function(){
						let that = this
						let formData = new FormData();
						formData.append('userid',that.userid);
						formData.append('token',that.token);
						formData.append('id',that.pageId);
						formData.append('endtime',that.datatime);	
						formData.append('content',that.editcontent);
						formData.append('languagestatus',that.languagestatus);
						axios({
							url:'http://admin.yiyulihua.com/api/sheji.competition/editagain',
							method:'post',
							data:formData,
							headers:{
								'Content-Type':'application/x-www-form-urlencoded'
							}
						})
						.then((res) =>{
							if(res.data.code == 1){
								that.tipeditchuang = 1
								that.editTip = res.data.msg
								setInterval(function(){
									that.tipeditchuang = 0
									location.reload()
								},1300)
							}
							if(res.data.code == 0){
								that.tipeditchuang = 1
								that.editTip = res.data.msg
								setInterval(function(){
									that.tipeditchuang = 0
								},1300)
							}
						})
					},
					// 有押金编辑
					openEditpopup:function(){
						if(this.desopit == 1){
							this.Editpopupmoney = 1
							this.value2 = this.pagelist.endtime
							layedit.setContent(index,this.pagelist.describecontent)
							// console.log()
						}else{
							this.Editpopup = 1
						}
					},
					// 有押金关闭编辑
					closeEditmoneypopup:function(){
						this.Editpopupmoney = 0
					},
					// 没有押金关闭弹窗
					closeEditpopup:function(){
						this.Editpopup = 0
					},
					// 跳转至我的-押金
					Topersonpage:function(){
						window.location.href = 'personalcenter.html?Edit='+1
					},
					// 转成中国标准时间
					getdateRule:function(data) { // 中国标准时间，转换为日期格式Sat Dec 12 2020 15:40:54 GMT+0800 =》2020-12-12
						var now = data || ''
						now = new Date(now);
						if(now != ''){
							var year = now.getFullYear()
							var month = now.getMonth() + 1
							var day = now.getDate()
							var h = now.getHours();
							var mm = now.getMinutes();
							return year + '/' + this.add0(month) + '/' + this.add0(day) + ' ' + this.add0(h) + ':' + this.add0(mm);
						}
					},
					// 提交编辑
					Editmoneybtn:function(){
						let that =this
						let date = that.getdateRule(that.value2)
						that.datatime = new Date(date).getTime()
						that.editcontent = layedit.getContent(index)
						that.geteditagain()
					},
					// 收藏
					changcoll:function(id,type){
						console.log(type)
						let that = this
						if(type == 0){
							type = 1
						}else if(type == 1){
							type = 0
						}
						axios.get('http://admin.yiyulihua.com/api/sheji.competition/collection',{
							params:{
								userid:that.userid,
								token:that.token,
								id:id,
								type:type
							}
						})
						.then((res) =>{
							console.log(res)
							if(res.data.code == 1){
								if(that.pagelist.collstatus == 1){
									that.pagelist.collstatus = 0
								}else if(that.pagelist.collstatus == 0){
									that.pagelist.collstatus = 1
								}
							}else if(res.data.code == 2){
								// that.tanchuang = 1
							}
						})
					},
					// 打开用户协议
					openagreement:function(){
						this.agreeReason = false
						this.agreementtip = 1
						this.getuseragreementinfo()
					},
					// 关闭用户协议
					closeagreementtip:function(){
						this.agreementtip = 0
					},
					// 查看审核失败的原因
					openreason:function(id){
						let that = this
						that.prizelist.forEach((item,index) =>{
							if(item.id == id){
								that.falireason = item.deadtext
								that.falireasonE = item.deadtextE
								console.log(that.falireason)
							}
						})
						
						this.agreeReason = true
						this.agreementtip = 1
					}
					
				}
			})

			
			
		</script>
	</body>
</html>
